package com.ruoyi.project.pc.service.impl;

import java.util.List;

import com.ruoyi.project.pc.domain.HomePage;
import com.ruoyi.project.pc.mapper.HomePageMapper;
import com.ruoyi.project.pc.service.IHomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 首页Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class HomePageServiceImpl implements IHomePageService
{
    @Autowired
    private HomePageMapper homePageMapper;

    /**
     * 查询首页
     * 
     * @param id 首页ID
     * @return 首页
     */
    @Override
    public HomePage selectHomePageById(Long id)
    {
        return homePageMapper.selectHomePageById(id);
    }

    /**
     * 查询首页列表
     * 
     * @param homePage 首页
     * @return 首页
     */
    @Override
    public List<HomePage> selectHomePageList(HomePage homePage)
    {
        return homePageMapper.selectHomePageList(homePage);
    }

    /**
     * 新增首页
     * 
     * @param homePage 首页
     * @return 结果
     */
    @Override
    public int insertHomePage(HomePage homePage)
    {
        return homePageMapper.insertHomePage(homePage);
    }

    /**
     * 修改首页
     * 
     * @param homePage 首页
     * @return 结果
     */
    @Override
    public int updateHomePage(HomePage homePage)
    {
        return homePageMapper.updateHomePage(homePage);
    }

    /**
     * 批量删除首页
     * 
     * @param ids 需要删除的首页ID
     * @return 结果
     */
    @Override
    public int deleteHomePageByIds(Long[] ids)
    {
        return homePageMapper.deleteHomePageByIds(ids);
    }

    /**
     * 删除首页信息
     * 
     * @param id 首页ID
     * @return 结果
     */
    @Override
    public int deleteHomePageById(Long id)
    {
        return homePageMapper.deleteHomePageById(id);
    }
}
